<template>
  <tr>
          <th>
            <input type="checkbox" v-model="isAll"/> <span>全选</span>
          </th>
          <th>名称</th>
          <th>价格</th>
          <th>数量</th>
          <th>总价</th>
          <th>操作</th>
        </tr>
</template>

<script>
export default {
  data () {
    return {

    }
  },

  created () {

  },
  props: ['datah'],
  methods: {

  },
  computed: {
    isAll: {
      get () {
        return this.datah.every(item => item.checked)
      },
      set (val) {
        this.datah.forEach(item => (item.checked = val))
      }
    }
  }
}
</script>

<style scoped lang='less'>

</style>
